package com.swiot.biz.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.swiot.common.annotation.Excel;
import com.swiot.common.core.domain.BaseEntity;

/**
 * 规则业务对象 biz_rule
 * 
 * @author kingdom
 * @date 2025-08-24
 */
public class Rule extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键ID */
    private String id;

    /** 规则标识符 */
    @Excel(name = "规则标识符")
    private String ruleCode;

    /** 规则名称 */
    @Excel(name = "规则名称")
    private String ruleName;

    /** 规则参数 */
    @Excel(name = "规则参数")
    private String ruleParams;

    /** 规则描述 */
    @Excel(name = "规则描述")
    private String ruleDescription;

    /** 规则状态 (0:禁用, 1:启用) */
    @Excel(name = "规则状态 (0:禁用, 1:启用)")
    private Long ruleStatus;

    /** 删除标志（0代表存在 2代表删除） */
    private String delFlag;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date createdTime;

    /** 更新时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "更新时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date updatedTime;

    /** 删除时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "删除时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date deletedTime;

    /** 创建人用户ID */
    @Excel(name = "创建人用户ID")
    private String createdById;

    /** 最后更新人用户ID */
    @Excel(name = "最后更新人用户ID")
    private String updatedById;

    /** 创建人 */
    @Excel(name = "创建人")
    private String createdBy;

    /** 最后更新人 */
    @Excel(name = "最后更新人")
    private String updatedBy;

    public void setId(String id) 
    {
        this.id = id;
    }

    public String getId() 
    {
        return id;
    }
    public void setRuleCode(String ruleCode) 
    {
        this.ruleCode = ruleCode;
    }

    public String getRuleCode() 
    {
        return ruleCode;
    }
    public void setRuleName(String ruleName) 
    {
        this.ruleName = ruleName;
    }

    public String getRuleName() 
    {
        return ruleName;
    }
    public void setRuleParams(String ruleParams) 
    {
        this.ruleParams = ruleParams;
    }

    public String getRuleParams() 
    {
        return ruleParams;
    }
    public void setRuleDescription(String ruleDescription) 
    {
        this.ruleDescription = ruleDescription;
    }

    public String getRuleDescription() 
    {
        return ruleDescription;
    }
    public void setRuleStatus(Long ruleStatus) 
    {
        this.ruleStatus = ruleStatus;
    }

    public Long getRuleStatus() 
    {
        return ruleStatus;
    }
    public void setDelFlag(String delFlag) 
    {
        this.delFlag = delFlag;
    }

    public String getDelFlag() 
    {
        return delFlag;
    }
    public void setCreatedTime(Date createdTime) 
    {
        this.createdTime = createdTime;
    }

    public Date getCreatedTime() 
    {
        return createdTime;
    }
    public void setUpdatedTime(Date updatedTime) 
    {
        this.updatedTime = updatedTime;
    }

    public Date getUpdatedTime() 
    {
        return updatedTime;
    }
    public void setDeletedTime(Date deletedTime) 
    {
        this.deletedTime = deletedTime;
    }

    public Date getDeletedTime() 
    {
        return deletedTime;
    }
    public void setCreatedById(String createdById) 
    {
        this.createdById = createdById;
    }

    public String getCreatedById() 
    {
        return createdById;
    }
    public void setUpdatedById(String updatedById) 
    {
        this.updatedById = updatedById;
    }

    public String getUpdatedById() 
    {
        return updatedById;
    }
    public void setCreatedBy(String createdBy) 
    {
        this.createdBy = createdBy;
    }

    public String getCreatedBy() 
    {
        return createdBy;
    }
    public void setUpdatedBy(String updatedBy) 
    {
        this.updatedBy = updatedBy;
    }

    public String getUpdatedBy() 
    {
        return updatedBy;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("ruleCode", getRuleCode())
            .append("ruleName", getRuleName())
            .append("ruleParams", getRuleParams())
            .append("ruleDescription", getRuleDescription())
            .append("ruleStatus", getRuleStatus())
            .append("delFlag", getDelFlag())
            .append("createdTime", getCreatedTime())
            .append("updatedTime", getUpdatedTime())
            .append("deletedTime", getDeletedTime())
            .append("createdById", getCreatedById())
            .append("updatedById", getUpdatedById())
            .append("createdBy", getCreatedBy())
            .append("updatedBy", getUpdatedBy())
            .toString();
    }
}
